Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add definition for the license file #367

Merged
merged 3 commits into from
Jul 25, 2022

Conversation

jsoriano
Copy link
Member

What does this PR do?

Add definition for the license file, as being included in elastic/elastic-package#882.

Why is it important?

To specify the file where the license text of a package should be.

Checklist

Related issues

@jsoriano jsoriano requested a review from a team as a code owner June 30, 2022 12:43
@jsoriano jsoriano self-assigned this Jun 30, 2022
@elasticmachine
Copy link

elasticmachine commented Jun 30, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-22T03:00:25.134+0000

  • Duration: 7 min 14 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

versions/1/integration/spec.yml Show resolved Hide resolved
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... shouldn't it be populated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, this is the template for the boilerplate that should be added to licensed files.

This makes me think that it may be more complicated to apply the license than just adding the text file, if we manage this, we should also ensure that all files have their expected headers.

Maybe a better approach for all this could be:

  • Make it part of elastic-package format instead of elastic-package build (but to be practical this may require Introduce new package spec version  #345).
  • elastic-package format would add the license file according to the definition in the manifest, and the license headers.
  • We would only support a limited set of licenses (as we are doing by now).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me more like a part of the building procedure:

  • you could use data from the manifest to populate the license
  • it's more advanced than just formatting.
  • user can define their own custom license, store it in _dev/build like docs templates.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But take into account that it is not only about populating these fields, in principle the Apache License requires headers in licensed files, this may be difficult to support here.

Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".

Another option I see is:

  • The source.license field is only an indication for package consumers, it is responsibility of package developers to properly apply the licenses.
  • Developers may use tools like go-licenser to properly apply the licenses to their work, or do it manually, as they prefer.
    • elastic-package format could be this tool if source.license is set and we add a field in the manifest for the copyright owner. License text could be still included in build time.

user can define their own custom license, store it in _dev/build like docs templates.

In principle we were considering allowing only a limited set of licenses, see the mentions to an enum here and preference over arbitrary text files here.

Or do you mean to include here the template for the headers of the files?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".

For such cases, we can assume default field values (for example "Elasticsearch B.V.") to populate the license template.

Or do you mean to include here the template for the headers of the files?

Could you please provide a sample header that needs customization? If we want to support a limited set of licenses, those can be for sure embedded in elastic-package. I'm still wondering if this is something we can render out of embedded templates. Even if we have to add more properties to the manifest.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".

For such cases, we can assume default field values (for example "Elasticsearch B.V.") to populate the license template.

How would we support external developers (community, partners...). Or we delay this by now?

Or do you mean to include here the template for the headers of the files?

Could you please provide a sample header that needs customization? If we want to support a limited set of licenses, those can be for sure embedded in elastic-package. I'm still wondering if this is something we can render out of embedded templates. Even if we have to add more properties to the manifest.

With customizations I mean here for example filling the placeholders in the header for the Apache license.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we support external developers (community, partners...). Or we delay this by now?

Yes, as we want to start with a predefined set of licenses, I meant postponing the community area.

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can consider improvement in semantic validation, to make sure that the license is aligned with subscriptions mentioned in the manifest.

@mtojek mtojek self-requested a review July 25, 2022 11:00
@jsoriano jsoriano merged commit 473ebb1 into elastic:main Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants